Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting timeout #2736

Merged
merged 7 commits into from Jul 30, 2019
Merged

Conversation

RafalSumislawski
Copy link
Member

@RafalSumislawski RafalSumislawski commented Jul 21, 2019

Follow-up to http4s/blaze#308.

WIP: It won't compile until the aforementioned PR is merged and blaze 0.14.7 is released.

This PR:

  • gives users ability to provide custom TickWheelExecutor in place of the one allocated by BlazeClientBuilder
  • adds connectingTimeout for configuring the newly introduced connectingTimeout in blaze's ClientChannelFactory

Fixes: #2386, #2338, #2690

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. A couple ideas below. And thanks for targeting series/0.20 with this. I'd like to get this into a patch release of http4s as soon as possible.

@@ -20,6 +23,7 @@ sealed abstract class BlazeClientBuilder[F[_]] private (
val responseHeaderTimeout: Duration,
val idleTimeout: Duration,
val requestTimeout: Duration,
val connectingTimeout: Duration,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshed: async-http-client and jetty-client both call this connectTimeout. Maybe that's a better name for consistency. Would also affect the blaze PR.

@@ -33,6 +37,7 @@ sealed abstract class BlazeClientBuilder[F[_]] private (
val parserMode: ParserMode,
val bufferSize: Int,
val executionContext: ExecutionContext,
val scheduler: Option[TickWheelExecutor],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like the Ember idiom for defaultable resources, where the builder provides a default, or an unmanaged one can be passed in.

@RafalSumislawski RafalSumislawski changed the title WIP: Connecting timeout Connecting timeout Jul 29, 2019
@RafalSumislawski
Copy link
Member Author

The build fails due to binary compatibility issue in BlazeClientBuilder and Http1Supoport constructors. Both constructors are private. Do we really care about binary compatibility of private APIs? @rossabaker how should I approach this topic?

@rossabaker
Copy link
Member

It should be safe to add a MiMa exclusion to the build for both of those.

@rossabaker
Copy link
Member

I think both test failures are flakes. Restarted.

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants